import axios from '../assets/js/http'
import url from './url'

axios.defaults.withCredentials = true

export const unAllowDfOrder = params =>{
  return axios.post(url.unAllowDfOrder,params)
}

export const sendDfOrder = params =>{
  return axios.post(url.sendDfOrder,params)
}

export const getAllowBusinessList = params =>{
  return axios.get(url.getAllowBusinessList,{params:params})
}

export const deleteDfBusiness = params =>{
  return axios.get(url.deleteDfBusiness+params)
}


export const saveDfBusiness = params =>{
  return axios.post(url.saveDfBusiness,params)
}

export const saveDfOrder = params =>{
  return axios.post(url.saveDfOrder,params)
}

export const getDfOrderList = params =>{
  return axios.get(url.getDfOrderLish,{params:params})
}

//list
export const getCheckCode = params =>{
  return axios.get(url.checkCode,{params:params})
}
// getverifyCode
export const getverifyCode = params =>{
  return axios.post(url.verifyCode,params)
}
//list
export const getDaifu = params =>{
  return axios.get(url.daifu,{params:params})
}

//savedaifu
export const saveDaifu = params =>{
  return axios.post(url.saveDaifu,params)
}

//index
export const getIndex = params =>{
  return axios.get(url.index,{params:params})
}

//获取用户列表
export const getUserList = params =>{
  return axios.get(url.userList,{params:params})
}

//修改用户
export const reviseUser = params =>{
  return axios.post(url.reviseUser,params)
}

export const userCount = params =>{
  return axios.post(url.userCount,params)
}

//balance
export const getBalance = params =>{
  return axios.get(url.balance,{params:params})
}

//	绑定商户
export const bindBusiness = params =>{
  return axios.post(url.business,params)
}

//查询当前绑定商户情况
export const askBusiness = params =>{
  return axios.get(url.askBusiness+params)
}

//充值金额
export const postRecharge = params =>{
  return axios.post(url.recharge,params)
}

//启用
export const getStart = params =>{
  return axios.get(url.start+params)
}

//停用
export const getStop = params =>{
  return axios.get(url.stop+params)
}

//获取用户信息
export const getUserInfo = params =>{
  return axios.get(url.userInfo,{params:params})
}

//保存商户
export const saveBusiness = params =>{
  return axios.post(url.saveBusiness,params)
}

//获取商户列表
export const getBusinessList = (params,data) =>{
  return axios.get(url.BusinessList+params,{params:data})
}

//BusinessStop
export const getBusinessStop = params =>{
  return axios.get(url.businessStop+params)
}

//BusinessStart
export const getBusinessStart = params =>{
  return axios.get(url.businessStart+params)
}

//保存商户组
export const saveBusinessGroup = params =>{
  return axios.post(url.businessGroup,params)
}

//商户组列表
export const getBusinessGroupList = params =>{
  return axios.get(url.businessGroupList+params)
}

//商户组start
export const getBusinessGroupStart = params =>{
  return axios.get(url.businessGroupStart+params)
}

//商户组stop
export const getBusinessGroupStop = params =>{
  return axios.get(url.businessGroupStop+params)
}

//权限列表
export const getPermissionList = params =>{
  return axios.get(url.permissionList,{params:params})
}

//保存权限
export const savePermission = params =>{
  return axios.post(url.savePermission,params)
}

//删除权限
export const deletePermission = params =>{
  return axios.delete(url.deletePermission+params)
}

//用户分页查询
export const getUserPage = params =>{
  return axios.get(url.userPage,{params:params})
}

//保存用户
export const saveUser = params =>{
  return axios.post(url.saveUser,params)
}


//获取角色列表
export const getRoleList = params =>{
  return axios.get(url.roleList,{params:params})
}
//保存角色
export const saveRole = params =>{
  return axios.post(url.saveRole,params)
}
//修改菜单关系
export const postMenu = params =>{
  return axios.post(url.postMenu,params)
}



//用户角色修改
export const saveUserRole = params =>{
  return axios.post(url.saveUserRole,params)
}

//查看下级的角色列表
export const getSeeRoleList = params =>{
  return axios.get(url.seeRoleList+params)
}

//删除用户
export const deleteUser = params =>{
  return axios.delete(url.deleteUser+params)
}

//查询用户
export const getAskUser = params =>{
  return axios.get(url.askUser+params)
}

//登录
export const login = params =>{
  return axios.post(url.login,params)
}

//登录成功
export const loginSuccess = params =>{
  return axios.post(url.loginSuccess,params)
}

//退出登录
export const getLogout = params =>{
  return axios.get(url.logout)
}

//获取用户导航栏设置
export const getNavigation = params =>{
  return axios.get(url.getNavigation,{params:params})
}

//获取用户信息
export const getUserInfoAuth = params =>{
  return axios.get(url.getUserInfoAuth,{params:params})
}

//菜单列表
export const getMenuList = params =>{
  return axios.get(url.menuList,{params:params})
}

//保存菜单
export const saveMenu = params =>{
  return axios.post(url.saveMenu,params)
}

//权限编辑
export const permissionPost = params =>{
  return axios.post(url.permissionPost,params)
}

//菜单权限列表
export const getMenuPermissionList = params =>{
  return axios.get(url.menuPermissionList+params)
}
//删除菜单
export const deleteMenu = params =>{
  return axios.delete(url.deleteMenu+params)
}
//菜单详情
export const getMenuDetail = params =>{
  return axios.get(url.menuDetail+params)
}

//菜单列表roleId
export const getMenuRoleList = params =>{
  return axios.get(url.menuRoleList+params)
}

//删除角色
export const deleteRole = params =>{
  return axios.delete(url.deleteRole+params)
}

//角色详情
export const getRoleDetail = params =>{
  return axios.post(url.roleDetail+params)
}

//资源查询列表
export const getResourceList = params =>{
  return axios.get(url.resourceList,{params:params})
}

//保存资源
export const saveResource = params =>{
  return axios.post(url.saveResource,params)
}

//权限编辑
export const aditorPermission = params =>{
  return axios.post(url.aditorPermission,params)
}

//获取资源权限列表
export const getResourcePermissionList = params =>{
  return axios.get(url.resourcePermissionList+params)
}

//删除资源
export const deleteResource = params =>{
  return axios.delete(url.deleteResource+params)
}

//通道列表
export const getChannelList = params =>{
  return axios.get(url.channelList,{params:params})
}
//保存通道
export const saveChannel = params =>{
  return axios.post(url.saveChannel,params)
}
//通道start
export const getChannelStart = params =>{
  return axios.get(url.channelStart+params)
}
//通道stop
export const getChannelStop = params =>{
  return axios.get(url.channelStop+params)
}

//保存金额转换
export const saveMoneyMap = params =>{
  return axios.post(url.saveMoneyMap,params)
}
//金额转换列表
export const getMoneyMapList = params =>{
  return axios.get(url.moneyMapList+params)
}
//删除
export const deleteMoneyMap = params =>{
  return axios.delete(url.deleteMoneyMap+params)
}

//获取用户提现列表
export const getCashList = params =>{
  return axios.get(url.getCashList,{params:params})
}
//获取用户提现银行卡列表
export const getCashBankList = params =>{
  return axios.get(url.getCashBankList,{params:params})
}

//提现申请
export const requireCash = params =>{
  return axios.post(url.requireCash,params)
}
//后台提现
export const tixainBack = params =>{
  return axios.post(url.tixainBack,params)
}

//获取代付提现列表
export const getDaifuList = params =>{
  return axios.get(url.tixainBack,{params:params})
}

//获取所有提现列表
export const getAllCashList = params =>{
  return axios.get(url.getAllCashList,{params:params})
}

//查询所有订单
export const getAllOrderList = params =>{
  return axios.get(url.getAllOrderList,{params:params})
}

//历史登录last
export const getLoginLogLast = params =>{
  return axios.get(url.loginLogLast,{params:params})
}
//获取首页的公共
export const getAllMes = params =>{
  return axios.get(url.getAllMes,{params:params})
}

export const getMesId = params =>{
  return axios.get(url.getMesId+params)
}

//delete message
export const deleteMessage = params =>{
  return axios.get(url.deleteMessage+params)
}
//add message
export const saveMessage = params =>{
  return axios.post(url.saveMessage,params)
}
//获取客户首页信息

export const getIndexInfo = params =>{
  return axios.get(url.index,{params:params})
}
//获取报件列表
export const getReportList = (id,params) =>{
  return axios.get(url.reportList + id,{params:params})
}
//提交报件
export const postReport = params =>{
  return axios.post(url.postReport,params)
}

//后台获取修改银行卡申请列表
export const getchangeCardList = params =>{
  return axios.get(url.changeCardList,{params:params})
}
//同意修改
export const allowChange = params =>{
  return axios.get(url.allowChange+params)
}

//不同意修改
export const notAllowChange = params =>{
  return axios.get(url.notAllowChange+params)
}

//查询所有实名认证列表
export const getrealNameList = params =>{
  return axios.get(url.realName,{params:params})
}


//保存或修改实名认证
export const postName = params =>{
  return axios.post(url.postName,params)
}

//通过ID查找
export const getqueryName = params =>{
  return axios.get(url.queryName+params)
}
//通告ID删除

export const deleteName = params =>{
  return axios.get(url.deleteName+params)
}
//
export const update = params =>{
  return axios.post(url.update,params)
}

//获取分类列表
export const getClassifyList = params =>{
  return axios.get(url.classifyList,{params:params})
}
//添加或修改分类
export const saveClassify = params =>{
  return axios.post(url.saveClassify,params)
}
//删除分类
export const deleteClassify = params =>{
  return axios.get(url.deleteClassify+params)
}

//获取节假日列表
export const getHolidayList = params =>{
  return axios.get(url.holidayList,{params:params})
}
//添加或修改节假日
export const saveHoliday = params =>{
  return axios.post(url.saveHoliday,params)
}
//删除节假日
export const deleteHoliday = params =>{
  return axios.get(url.deleteHoliday+params)
}

//获取提现通道列表
export const getTixianChannelList = params =>{
  return axios.get(url.tixianChannelList,{params:params})
}


//获取提现的商务座列表
export const getTixianGroupList = (id,params) =>{
  return axios.get(url.tixianGroupList+id,{params:params})
}


//获取提现商户列表
export const getTixianBusinessList = (id,params) =>{
  return axios.get(url.tixianBusinessList+id,{params:params})
}

//获取报件通道列表
export const getReportChannle = params =>{
  return axios.get(url.reportChannle,{params:params})
}

//获取报件的商户组列表
export const getReportGroup = (id,params) =>{
  return axios.get(url.reportGroup+id,{params:params})
}
//提现成功
export const tixianSuccess =(id, params) =>{
  return axios.get(url.tixianSuccess+id,{params:params})
}

//提现失败

export const tixianFail = (id, params) =>{
  return axios.get(url.tixianFail+id,{params:params})
}
//验证邮箱是否存在
export const getQueryEmail = params =>{
  return axios.get(url.queryEmail,{params:params})
}
//是否通过审核

export const checkStatus = params =>{
  return axios.get(url.checkStatus,{params:params})
}
//获取银行卡申请列表
export const getBankList = params =>{
  return axios.get(url.bankList,{params:params})
}
export const getlastBank = params =>{
  return axios.get(url.lastBank,{params:params})
}

//绑定银行卡
export const changeCard = params =>{
  return axios.post(url.changeCard,params)
}
//绑定银行卡
export const savechangeCard = params =>{
  return axios.post(url.savechangeCard,params)
}
//撤销申请
export const backChange = params =>{
  return axios.get(url.backChange,{params:params})
}
//实名认证
export const postRealName = params =>{
  return axios.post(url.postName,params)
}

//历史登录
export const getLoginLog = params =>{
  return axios.get(url.loginLog,{params:params})
}

//绑定邮箱
export const sendBindEmail = params =>{
  return axios.post(url.sendBindEmail,params)
}

//验证绑定邮箱验证码
export const checkCode = params =>{
  return axios.post(url.checkCode,params)
}
//验证
export const sendForgetEmail = params =>{
  return axios.post(url.sendForgetEmail,params)
}

//验证
export const postmailcheckCode = params =>{
  return axios.post(url.mailcheckCode,params)
}

//传用户名
export const checkCodeNoPwd = params =>{
  return axios.post(url.checkCodeNoPwd,params)
}

//
export const getCountList = params =>{
  return axios.get(url.count,{params:params})
}

//查询用户订单
export const getOrderList = params =>{
  return axios.get(url.getOrderList,{params:params})
}
//
export const getchannels = params =>{
  return axios.get(url.channels,{params:params})
}
//添加银行卡
export const saveBusinessCard = params =>{
  return axios.post(url.saveBusinessCard,params)
}


//查询银行卡列表
export const getBusinessCard = (id,params) =>{
  return axios.get(url.businessCard + id,{params:params})
}
//商户银行卡列表
export const getBusinessCardList =id=>{
  return axios.get(url.businessCardList + id)
}
//用户订单统计
export const getUserOrderCount = params =>{
  return axios.get(url.userOrderCount,{params:params})
}
//修改用户mima
export const revisePwd = params =>{
  return axios.post(url.revisePwd,params)
}
//后台订单统计
export const getBackOrderCount = params =>{
  return axios.get(url.backOrderCount,{params:params})
}
//订单统计
export const getorderCountList = params =>{
  return axios.get(url.orderCount,{params:params})
}
//获取手机验证码
export const getphoneCheckCode = params =>{
  return axios.get(url.phoneCheckCode,{params:params})
}
//提交手机验证码
export const savePhoneCheckCode = params =>{
  return axios.post(url.savePhoneCheckCode,params)
}
//获取用户二维码列表
export const getErCodeList = params =>{
  return axios.get(url.erCodeList,{params:params})
}
//用户点击准备
export const getReady = params =>{
  return axios.post(url.getReady+params)
}

//查看二维码
export const seeErCode = params =>{
  return axios.get(url.seeErCode+ params)
}
//确定二维码
export const makeCode = params =>{
  return axios.post(url.makeCode+params)
}
//刷新二维码
export const refreshCode = params =>{
  return axios.post(url.refreshCode+params)
}
//删除二维码
export const deleteCode = params =>{
  return axios.delete(url.deleteCode+params)
}
//确定订单
export const confirmOrder = (id, params) =>{
  return axios.post(url.confirmOrder+id, params)
}
//重发回调
export const reSendBack = params =>{
  return axios.post(url.reSendBack+params)
}


//查询支付宝订单
export const getAliPayList = params =>{
  return axios.get(url.aliPay,{params:params})
}
//支付宝订单从统计
export const getAliPayCountList = params =>{
  return axios.get(url.aliPayCount,{params:params})
}

//错误单从统计
export const getErrorOrderList = params =>{
  return axios.get(url.errorOrder + params)
}
//修改商户
export const reviseBusiness = (params) =>{
  return axios.post(url.reviseBusiness, params)
}
//
export const getUploadList = (id,params) =>{
  return axios.get(url.uploadList + id,{params: params})
}
//
export const deleteErcode = (id,params) =>{
  return axios.delete(url.deleteErcode + id,{params: params})
}
//商户订单统计
export const getBusinessCount = params =>{
  return axios.get(url.businessCount,{params:params})
}
//提现统计
export const getTixianCount = params =>{
  return axios.get(url.tixianCount,{params:params})
}
//小贱二维码
export const getVerifyCode = (id, params) =>{
  return axios.get(url.verifyCode + id,{params:params})
}
//修改商户
export const reviseBusiness2 = (params) =>{
  return axios.post(url.reviseBusiness2, params)
}
//upload2
export const getUploadList2 = (id,params) =>{
  return axios.get(url.uploadList2 + id,{params: params})
}
//
export const deleteErcode2 = (id,params) =>{
  return axios.delete(url.deleteErcode2 + id,{params: params})
}
//小贱二维码2
export const getVerifyCode2 = (id, params) =>{
  return axios.get(url.verifyCode2 + id,{params:params})
}
// 导出文件
export const exportOrder = params =>{
  return axios.get(url.exportOrder,{params:params})
}
// 查询二维码列表
export const beforeDelete = (id,params) =>{
  return axios.get(url.beforeDelete + id,{params:params})
}
// 删除查询二维码列表
export const deleteCodeMany = (id,params) =>{
  return axios.delete(url.deleteCodeMany + id,{params:params})
}
// 冻结金额
export const fixMoney = (id,params) =>{
  return axios.post(url.fixMoney + id,params)
}
// 解冻
export const backMoney = (id,params) =>{
  return axios.post(url.backMoney + id,params)
}
// name1
export const getUserFirst = params =>{
  return axios.get(url.userFirst,{params:params})
}
// name2
export const getUserSecond = params =>{
  return axios.get(url.userSecond,{params:params})
}
// 用户金额统计
export const getuserMoneyCount = params =>{
  return axios.get(url.userMoneyCount,{params:params})
}
// 上传
export const savewxCode = (params) =>{
  return axios.post(url.wxCode, params)
}
//获取用户信息
export const getUserInfo2 = () => {
  return axios.get(url.getUserInfo)
}
// 校验
export const getwxCodeVerify = (id,params) =>{
  return axios.get(url.wxCodeVerify+id,{params:params})
}
//获取RSA公钥及私钥
export const getUserKet = () => {
  return axios.get(url.getRSAKey)
}
//网站配置
export const saveConfig = (params) => {
  return axios.post(url.config,params)
}
export const getConfigList = () => {
  return axios.get(url.config)
}
export const deleteConfig = (params) => {
  return axios.delete(url.config,{params:params})
}
//代付管理
export const getDfBusinessList = (params) =>{
  return axios.get(url.getDfBusinessList,{params:params})
}

function createPostParams (obj) {
  return qs.stringify(obj, { indices: false })
}
